package com.qf.feign;

import com.qf.entity.Coupon;
import com.qf.entity.CouponTemplate;
import com.qf.entity.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Date;
import java.util.List;

@FeignClient("MICRO-COUPON")
public interface CouponFeign {

    @RequestMapping("/couponTemplate/list")
    public R<List<CouponTemplate>> list();

    @RequestMapping("/couponTemplate/save")
    public R<Boolean> save(@RequestBody CouponTemplate couponTemplate);

    @RequestMapping("/coupon/list")
    public R<List<Coupon>> couponlist();

    @RequestMapping("/coupon/insert")
    public R<Boolean> couponSave(@RequestBody Coupon coupon);

    @RequestMapping("/coupon/queryById")
    public R<Coupon> queryById(@RequestParam Integer cid);

    @RequestMapping("/coupon/queryByTimes")
    public R<List<Coupon>> queryByTimes(@RequestBody Date beginTime);
}
